<template>
    <div>
        <div class="title">猜你喜欢</div>
        <ul>
            <li class="item border-bottom" v-for="recommend of list" v-bind:key="recommend.id">
                <div class="item-img-wrapper">
                    <img class="item-img" v-bind:src="recommend.imgURL"/>
                </div>
                <div class="item-info">
                    <p class="item-title">{{recommend.title}}</p>
                    <p class="item-desc">{{recommend.desc}}</p>
                </div>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
  name: 'HomeWeekend',
  props: {
    list: Array
  },
  data () {
    return {
      // recommendList: [{
      //   id: '001',
      //   imgURL: 'http://img1.qunarzz.com/sight/source/1507/d9/2ddc7652fdba16.jpg_r_640x214_5e62f1a3.jpg',
      //   title: '深圳周边游',
      //   desc: '远离城市拥堵，去周边开启清新假期吧。'
      // }, {
      //   id: '002',
      //   imgURL: 'http://img1.qunarzz.com/sight/source/1811/15/66f14e0fd6fbb.jpg_r_640x214_5d69f21d.jpg',
      //   title: '清远周边逛',
      //   desc: '人人都有一双发现美的眼睛，身边的事物最熟悉不过，那你可曾发现了被人遗漏的美？处'
      // }]
    }
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/mixins.styl'
  .title
    line-height: .8rem
    background: #eee
    text-indent: .2rem
  .item-img-wrapper
    overflow: hidden
    height: 0
    padding-bottom: 37.09%
  .item-img
    width: 100%
  .item-info
    padding: .1rem
    .item-title
      line-height: .54rem
      font-size: .32rem
      ellipsis()
    .item-desc
        line-height: .4rem
        color: #aaa
        ellipsis()
</style>
